package com.example.captcha1.demos.web;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;
@Slf4j
@RestController
public class LoggerController {
    //从日志工厂，拿到类一个日志对象，要传一个日志名称
   // private  static Logger logger= LoggerFactory.getLogger("lcl是大王");
    @PostConstruct
    public void print(){
        System.out.println("打印日志");
        log.info("__没毛病");
        log.error("我是傻子");
        log.warn("你是傻子");
        log.info("我们都不聪明");
        log.debug("你才傻傻都");
        log.trace("要不要去放烟花呀");
    }
}
